<?php
/* @var $this DefaultController */

$this->breadcrumbs = array(
    $this->module->id,
);
?>

<div class="row-fluid">
    <div class="span12">
        <!--ButtonsBar Start -->
        <div class="buttons-bar">
            <div class="clear"></div>	
            <div class="pull-left">
                <div class="pull-left">
                    <a href="<?php echo Activity::viewAllUrl() ?>" 
                       class="btn">
                        <i class="icon-eye-open"></i>
                        <?php echo Yii::t('admin', 'Activity') ?>
                    </a>           
                </div>
            </div>
            <div class="pull-right">
                <a href="<?php echo Option::settingUrl() ?>" class="btn">
                    <i class="icon-cog"></i>
                    <?php echo Yii::t('quanly', 'Setting') ?>
                </a>
            </div>
            <div class="clear"></div>
        </div>
        <div class="span11">
            <!--Shopping Cart Start-->
            <div class="grid">
                <div class="grid-title">
                    <div class="pull-left">Voi Thần Update</div>
                    <div class="clear"></div>   
                </div>

                <div class="products">
                    <?php foreach ($customer_news as $news): ?>
                        <div class="product">
                            <div class="product-avatar">
                                <img src=" <?php echo $news['thumbnail'] ?> ">
                            </div>
                            <div class="product-info">
                                <div class="product-name">
                                    <a target="_blank" href="<?php echo $news['link'] ?>">
                                        <?php echo MyUtil::word_limiter($news['title'], 10) ?>  
                                    </a>
                                    <span class="label label-warning"><?php echo $news['status'] ?></span> 
                                </div>
                                <div class="product-desc">
                                    <?php echo MyUtil::word_limiter($news['summary'], 20) ?>
                                </div>
                            </div>
                            <div class="product-delete">
                                <a target="_blank" href="<?php echo $news['link'] ?>">
                                    <span><i class="icon-hand-right"></i></span>
                                </a>
                            </div>
                            <div class="clear"></div>
                        </div>
                    <?php endforeach; ?>
                </div>

            </div>
            <!--Shopping Cart END-->
        </div>
    </div>
    <script>
        $(function() {
            // CHARts        


            /* table chart */
            $("table.chart2").each(function() {
                var colors = [];
                $("table.chart2 thead th:not(:first)").each(function() {
                    colors.push($(this).css("color"));
                    console.log($(this));
                });
                console.log(colors);
                $(this).graphTable({
                    series: 'columns', position: 'replace', width: '100%', height: '250px', colors: colors
                }, {xaxis: {tickSize: 1, },
                    yaxis: {
                        //                    max: 100,
                        //                    min: 0
                    }, series: {
                        points: {show: true},
                        lines: {show: true, fill: false, steps: false},
                    }
                });
            });

        });
    </script>
